package com.ihg.dec.apps.configuration;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

import com.ihg.dec.apps.preparer.MessageBean;
import com.ihg.dec.apps.preparer.TestViewPreparer;

@Configuration
public class AppConfig {

	@Bean(name={"test.preparer"})
	public TestViewPreparer testViewPreparer() {
		TestViewPreparer preparer = new TestViewPreparer();
		preparer.setMessage("Testing tiles preparer integration with SpringMVC");
		return preparer;
	}
	
	@Bean
	public MessageBean messageBean() {
		MessageBean messageBean = new MessageBean();
		messageBean.setMessage("Another test message for tiles view preparer.");
		return messageBean;
	}
}
